import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login.vue'
import Index from '../views/index.vue'
import Register from '../views/Register.vue'
import ShopCar from '../views/ShopCar.vue'
import Collection from '../views/Collection.vue'
import PersonInfo from '../views/PersonInfo.vue'
import Classfity from '../views/Classfity.vue'
import upLoad from '../views/upLoad.vue'
import editMygoods from '../views/editMygoods.vue'
import showProduce from '../views/showProduce.vue'
import forgetPassorUser from '../views/forgetPassorUser.vue'
import manage from '../views/manage.vue'
import editUser from '../views/editUser.vue'
import editShop from '../views/editShop.vue'
Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path:'/login',
    name:'Login',
    component:Login
  },
  {
    path:'/',
    name:'Index',
    component:Index
  },
  {
    path:'/register',
    name:'Register',
    component:Register

  },
  {
    path:'/shopcar',
    name:'ShopCar',
    component:ShopCar
  },
  {
    path:'/collection',
    name:'Collection',
    component:Collection
  },
  {
    path:'/personinfo',
    name:'PersonInfo',
    component:PersonInfo
  },
  {
    path:'/classfity',
    name:'Classfity',
    component:Classfity
  },
  {
    path:'/upload',
    name:'upLoad',
    component:upLoad
  },
  {
    path:'/editmygoods',
    name:'editmygoods',
    component:editMygoods
  },
  {
    path:'/showProduce',
    name:'showProduce',
    component:showProduce
  },
  {
    path:'/forgetPassorUser',
    name:'forgetPassorUser',
    component:forgetPassorUser
  },
  {
    path:'/manage',
    name:'manage',
    component:manage
  },
  {
    path:'/editUser',
    name:'editUser',
    component:editUser
  },
  {
    path:'/editShop',
    name:'editShop',
    component:editShop
  }
]

const router = new VueRouter({
  routes
})

export default router
